home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / CIncludes / QDOffscreen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-10-13  |  2.9 KB  |  91 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3. Created: Tuesday, May 9, 1989 at 5:26 PM
  4.     QDOffscreen.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.     Copyright Apple Computer, Inc.  1985-1989
  9.     All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __QDOFFSCREEN__
  15. #define __QDOFFSCREEN__
  16.  
  17. #ifndef __QUICKDRAW__
  18. #include <Quickdraw.h>
  19. #endif
  20.  
  21.  
  22. /* New error codes */
  23.  
  24. #define cDepthErr -157  /*invalid pixel depth*/
  25.  
  26. enum {pixPurgeBit = 0,noNewDeviceBit = 1,pixelsPurgeableBit = 6,pixelsLockedBit = 7,
  27.     mapPixBit = 16,newDepthBit = 17,alignPixBit = 18,newRowBytesBit = 19,reallocPixBit = 20,
  28.     clipPixBit = 28,stretchPixBit = 29,ditherPixBit = 30,gwFlagErrBit = 31};
  29.  
  30. enum {pixPurge = 1 << pixPurgeBit,noNewDevice = 1 << noNewDeviceBit,pixelsPurgeable = 1 << pixelsPurgeableBit,
  31.     pixelsLocked = 1 << pixelsLockedBit,mapPix = 1 << mapPixBit,newDepth = 1 << newDepthBit,
  32.     alignPix = 1 << alignPixBit,newRowBytes = 1 << newRowBytesBit,reallocPix = 1 << reallocPixBit,
  33.     clipPix = 1 << clipPixBit,stretchPix = 1 << stretchPixBit,ditherPix = 1 << ditherPixBit,
  34.     gwFlagErr = 1 << gwFlagErrBit};
  35. typedef unsigned long GWorldFlags;
  36.  
  37.  
  38. /* Type definition of a GWorldPtr */
  39.  
  40. typedef CGrafPtr GWorldPtr;
  41.  
  42. #ifdef __safe_link
  43. extern "C" {
  44. #endif
  45. pascal QDErr NewGWorld(GWorldPtr *offscreenGWorld,short PixelDepth,Rect *boundsRect,
  46.     CTabHandle cTable,GDHandle aGDevice,GWorldFlags flags)
  47.     = {0x7000,0xAB1D}; 
  48. pascal Boolean LockPixels(PixMapHandle pm)
  49.     = {0x7001,0xAB1D}; 
  50. pascal void UnlockPixels(PixMapHandle pm)
  51.     = {0x7002,0xAB1D}; 
  52. pascal GWorldFlags UpdateGWorld(GWorldPtr *offscreenGWorld,short pixelDepth,
  53.     Rect *boundsRect,CTabHandle cTable,GDHandle aGDevice,GWorldFlags flags)
  54.     = {0x7003,0xAB1D}; 
  55. pascal void DisposeGWorld(GWorldPtr offscreenGWorld)
  56.     = {0x7004,0xAB1D}; 
  57. pascal void GetGWorld(CGrafPtr *port,GDHandle *gdh)
  58.     = {0x7005,0xAB1D}; 
  59. pascal void SetGWorld(CGrafPtr port,GDHandle gdh)
  60.     = {0x7006,0xAB1D}; 
  61. pascal void CTabChanged(CTabHandle ctab)
  62.     = {0x7007,0xAB1D}; 
  63. pascal void PixPatChanged(PixPatHandle ppat)
  64.     = {0x7008,0xAB1D}; 
  65. pascal void PortChanged(GrafPtr port)
  66.     = {0x7009,0xAB1D}; 
  67. pascal void GDeviceChanged(GDHandle gdh)
  68.     = {0x700A,0xAB1D}; 
  69. pascal void AllowPurgePixels(PixMapHandle pm)
  70.     = {0x700B,0xAB1D}; 
  71. pascal void NoPurgePixels(PixMapHandle pm)
  72.     = {0x700C,0xAB1D}; 
  73. pascal GWorldFlags GetPixelsState(PixMapHandle pm)
  74.     = {0x700D,0xAB1D}; 
  75. pascal void SetPixelsState(PixMapHandle pm,GWorldFlags state)
  76.     = {0x700E,0xAB1D}; 
  77. pascal Ptr GetPixBaseAddr(PixMapHandle pm)
  78.     = {0x700F,0xAB1D}; 
  79. pascal QDErr NewScreenBuffer(Rect *globalRect,Boolean purgeable,GDHandle *gdh,
  80.     PixMapHandle *offscreenPixMap)
  81.     = {0x7010,0xAB1D}; 
  82. pascal void DisposeScreenBuffer(PixMapHandle offscreenPixMap)
  83.     = {0x7011,0xAB1D}; 
  84. pascal GDHandle GetGWorldDevice(GWorldPtr offscreenGWorld)
  85.     = {0x7012,0xAB1D}; 
  86. #ifdef __safe_link
  87. }
  88. #endif
  89.  
  90. #endif
  91.